<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>

/*    var test = 20;
    test = "张三";

    alert(test);*/

    /*
        var:
            1.作用域：全局变量
            2.变量可以重复定义
     */

    {
        let age = 30;
        let age2 = 20;
        // var age = 20;
    }
    alert(age);

    const PI = 3.14;
    PI = 3;

</script>
</body>
</html>